import Vue from 'vue'
import Router from 'vue-router'

import TestVue from "@/components/Test/TestVue"
import Insert from "@/components/Test/insert"
import SelectAll from "@/components/Test/selectAll"
import SelectOne from "@/components/Test/selectOne"
import Update from "@/components/Test/update"
import Normal from '@/components/Normal/Normal'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: '主页重定向',
      // component: HelloWorld
      redirect:"/index"
    },
    {
      path: '/index',
      name: '主页',
      component: TestVue,
      children:[
        {
          name:"修改操作",
          path:"/update",
          component:Update,
        },
        {
          name:"查看全部",
          path:"/selectAll",
          component:SelectAll,
        },
        {
          name:"查看一个",
          path:"/selectOne",
          component:SelectOne,
        },
        {
          name:"添加一个",
          path:"/insert",
          component:Insert,
        },
      ]
    },
    {
      path:"/normal",
      name:"展示基本操作",
      component:Normal,
    }
  ]
})
